<div class="disclose-list page-content ">
	<form nz-form [formGroup]="validateForm" class="page-header">
		<div nz-row [nzGutter]="24">
			<div nz-col [nzSpan]="6">
				<nz-form-item>
					<nz-form-label nzFor="visitTitle">爆料主题</nz-form-label>
					<nz-form-control>
						<input nz-input placeholder="请填写" formControlName="discloseTitle" />
					</nz-form-control>
				</nz-form-item>
			</div>

			<div nz-col [nzSpan]="6" [nzOffset]="12">
				<nz-form-item style="float: right;">
					<button nz-button (click)="onSearch(true)" *ngIf="authList.includes(authEnum.DISCLOSE_LIST_VIEW)">
						<i nz-icon nzType="search"></i>
						搜索
					</button>
				</nz-form-item>
			</div>
		</div>

	</form>


	<nz-table #basicTable [nzData]="data" [nzBordered]="true" [nzShowPagination]="false" nzSize="middle"
		[nzScroll]="{ y: 'calc(100vh - 190px)'}" [nzLoading]="nzLoading" [nzPageSize]="page.limit">
		<thead>
			<tr>
				<th nzAlign="center" nzWidth="50px">序号</th>
				<th nzAlign="center" nzWidth="15%">爆料主题</th>
				<th nzAlign="center" nzWidth="auto">爆料内容</th>
				<th nzAlign="center" nzWidth="10%">爆料人</th>
				<th nzAlign="center" nzWidth="100px">爆料人类型</th>
				<th nzAlign="center" nzWidth="10%">爆料时间</th>
				<th nzAlign="center" nzWidth="10%">联系方式</th>
				<th nzAlign="center" nzWidth="100px">处理状态</th>
				<th nzAlign="center" nzWidth="80px">处理结果</th>
				<th nzAlign="center" nzWidth="120px">操作</th>

			</tr>
		</thead>
		<tbody>
			<tr *ngFor="let item of basicTable.data; let i = index;">
				<td nzAlign="center">{{ i + 1}}</td>
				<td nzAlign="center">
					<span class="line-clamp" nz-tooltip [nzTooltipTitle]="item.discloseTitle">
						{{item.discloseTitle}}
					</span>
				</td>
				<td nzAlign="center">
					<span class="line-clamp" nz-tooltip [nzTooltipTitle]="item.discloseContent">
						{{item.discloseContent}}
					</span>
				</td>
				<td nzAlign="center">
					{{item.name}}
				</td>
				<td nzAlign="center">
					{{item.griderType === '0' ? '村户': ''}}
					{{item.griderType === '1' ? '专职网格长': ''}}
					{{item.griderType === '2' ? '网格员': ''}}
					{{item.griderType === '3' ? '微网格长': ''}}

				</td>
				<td nzAlign="center">
					{{item.discloseTime}}
				</td>
				
				
				<td nzAlign="center">
					{{item.contractNumber}}
				</td>
			
				<td nzAlign="center">
					{{item.status === '0' ? '未处理': ''}}
					{{item.status === '1' ? '处理中': ''}}
					{{item.status === '2' ? '审核未通过': ''}}
					{{item.status === '3' ? '审核通过': ''}}
				</td>
				<td nzAlign="center">
					<a (click)="result(item)">查看</a>
				</td>
				<td nzAlign="center" nzWidth="150px">
					<div class="menu-btn">
						<!-- 0的时候能调save方法， 1的时候才能调update 审核方法  -->
						<ng-container *ngIf=" ['0', '2'].includes(item.status)  && authList.includes(authEnum.DISCLOSE_LIST_EDIT)">
							<a (nzOnConfirm)="handle($event, item)"  popconfirm  [nzPopconfirmTitle]="discloseListHandleTpl">
								处理
							</a>
							<ng-template #discloseListHandleTpl>
								<textarea rows="4" nz-input [(ngModel)]="item.treatResult" style="width: 300px;"></textarea>
							</ng-template>
							<nz-divider nzType="vertical"></nz-divider>

						</ng-container>
						<ng-container *ngIf="['1'].includes(item.status) && authList.includes(authEnum.DISCLOSE_LIST_EDIT)">
							<a (nzOnConfirm)="verify($event, item)"  popconfirm [nzPopconfirmTitle]="discloseListHandleTpl">
								审核
							</a>
							<ng-template #discloseListHandleTpl>
								<div style="line-height: 30px;">
									<nz-radio-group [(ngModel)]="status">
										<label nz-radio nzValue="2">审核未通过</label>
										<label nz-radio nzValue="3">审核通过</label>
									</nz-radio-group>
								</div>
								
								<textarea rows="4" nz-input [(ngModel)]="item.verifyResult" style="width: 300px;"></textarea>
							</ng-template>
							<nz-divider nzType="vertical"></nz-divider>
						</ng-container>
						<a (click)="detail(item)" *ngIf="authList.includes(authEnum.DISCLOSE_LIST_DETAIL)">详情</a>
					</div>

				</td>
			</tr>
		</tbody>
	</nz-table>

	<div class="page-pagination">
		<span *ngIf="page.total">共{{page.total}}条数据</span>
		<nz-pagination [(nzPageIndex)]="page.page" [nzTotal]="page.total" nzShowQuickJumper nzShowSizeChanger
			[(nzPageSize)]="page.limit" (nzPageIndexChange)="onSearch()" (nzPageSizeChange)="onSearch(true)">
		</nz-pagination>
	</div>

</div>